﻿using LianXi1013.Entity;
using LianXi1013.Entity.Menu;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LianXi1013.Repostory.Menu
{
    public class MenuInforRepostory : IMenuInforRepostory
    {
        private readonly ProjectDbContext projectDbContext;

        public MenuInforRepostory(ProjectDbContext projectDbContext)
        {
            this.projectDbContext = projectDbContext;
        }

        /// <summary>
        /// 菜单的显示
        /// </summary>
        /// <returns></returns>
        public List<MenuInfor> GetMenu(int id)
        {
            var list = projectDbContext.MenuInfor.Where(m=>m.MenuFid==id).ToList();
            return list;
        }
    }
}
